package com.example.demo.controller;

import java.util.Map;

import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import com.example.demo.entity.ModelRes;

@RestController
public class FormController {

	@PostMapping(value = "/form", produces = "application/json;charset=UTF-8")
	public ModelRes<Object> sendForm(@RequestBody Map<String, Object> params) {
		System.out.println(params.get("user"));
		System.out.println(params.get("age"));
		ModelRes<Object> res = new ModelRes<Object>();
		res.setBody(params);
		return res;
	}
}
